/**
 * Created by PhpStorm.
 * User: Devmc
 * Date: 2021/4/25
 * Time: 3:12
 */
import {Message} from 'element-ui';


/**
 * 显示消息提示
 *
 * @param success
 * @param onClose
 */
function showMessage(success = true, onClose) {
    Message({
        type: success ? 'success' : 'error',
        message: success ? '请求成功！' : '请求失败！',
        duration: 2000,
        onClose: () => {
            onClose && onClose();
        }
    });
}


export default {
    showMessage
}